1. Field of the Invention
The present invention relates to antialias line generating method and antialias line generator for smoothly drawing an oblique line by using a CRT or the like.
2. Description of the Related Art
In recent years, an image display apparatus having high precision has been utilized in the field of computer graphics. Especially, in an effort to further enhance precision, a method has been developed which strengthen or weaken the pixel intensity to enhance apparent precision, the method being simply referred to as antialiasing hereinafter.
Conventional antialiasing will be described hereunder. FIG. 17 is a schematic diagram showing the contents of an antialias line generator for realization of the conventional antialiasing. In the Figure, the antialias line generator for calculating the pixel intensity is designated by reference numeral 201 and it comprises a line interpolator 202 for interpolating the precision of the pixel intensity with a precision which is increased four times in X and Y axes, on the basis of start and end points of a line and a drawing unit circle for validating a range within which the pixel intensity is interpolated, a pixel ratio calculator 203 for calculating a ratio of the number (or area) of sub-pixels whose intensity is interpolated for display to the entire area of a pixel which is divided into four divisions in X and Y axes, that is, an area of all of the 16 sub-pixels, and a pixel intensity validator 204 for calculating drawing axes and drawing intensity data from the calculated pixel ratio and current intensity data being present before display of the line (accordingly, defining a background after display of the line).
A line is represented by axes of start and end points and 221 designates a line start point X axis (x1), 222 a line start point Y axis (y1), 223 a line end point X axis (x2) and 224 a line end point Y axis (y2). Denoted by 227 is a draw signal for commanding the start of drawing. The above signals are input to the line interpolator 202.
Denoted by 225 is current intensity data and by 226 is pixel intensity data representative of intensity of a line to be drawn. These signals of the intensity data are input to the pixel intensity validator 204.
Obtained pixel drawing intensity data 228 is indicated in terms of pixel axis by using a draw X axis (x3) 229 and a draw Y axis (y3) 231 and when the drawing intensity data 228, draw X axis (x3) 229 and draw Y axis (y3) 231 are validated, a pixel intensity valid signal 233 is delivered. The above operation is repeated and when all of interpolation operations for the line are completed, a draw terminate signal 234 is delivered. The above signals 228, 229, 231, 233 and 234 constitute output signals of the pixel intensity validator 204.
FIG. 18 shows an example of a display image according to the conventional antialiasing and FIG. 19 is an enlarged view of a pixel in FIG. 18. In FIGS. 18 and 19, reference numeral 301 designates a drawing screen raster 1, 302 a drawing screen raster 2, 303 a drawing screen raster 3, 304 a drawing screen raster 4, 305 a drawing screen raster 5, 306 a drawing screen raster 6, 307 a drawing screen raster 7, 308 a drawing screen position a, 309 a drawing screen position b, 310 a drawing screen position c, 311 a drawing screen position d, 312 a drawing screen position e, 313 a drawing screen position f, 314 a drawing line, 316 a normal line drawing position, 501 a pixel in question, 502 a drawing unit circle, 503 an upper locus of the drawing unit circle, and 504 a lower locus of the drawing unit circle.
Operation will now be described in connection with the conventional antialiasing as above. Firstly, the line interpolator 202 receives the line start point X axis 221, line start point Y axis 222, line end point X axis 223 and line end point Y axis 224 which indicate axes of opposite ends of a line and the draw signal 227 for commanding drawing of the line, and starts line interpolation. At that time, by virtually setting drawing unit circles 502 at start and end points, upper and lower loci 503 and 504 of the drawing unit circles 502 which are tangents thereto are assumed, and pixels through which the upper and lower loci 503 and 504 pass are interpolated with a precision which is increased four times in X and Y axes.
Next, the pixel ratio calculator 203 (FIG. 17) determines a pixel ratio of an area surrounded by the upper and lower loci 503 and 504 to the entirety of a pixel. For example, to describe a pixel 501 in question, the pixel 501 of interest consists of 16 sub-pixels and since the number of sub-pixels existing in an area, which is surrounded by the upper and lower loci 503 and 504 and in which these sub-pixels are present even partly, is seven, the pixel ratio at the pixel 501 of interest is determined to be 7/16.
Further, the pixel intensity validator 204 calculates intensity of the pixel to be displayed at the interpolated intensity on the basis of the calculated pixel ratio, current intensity data 225 and pixel intensity data 226 and delivers drawing intensity data 228. At the same time, the draw X axis (x3) 229 and draw Y axis (y3) 231 which are indicative of a display axis and the pixel intensity valid signal 233 are delivered, completing drawing of one pixel.
To describe the correspondence between the above signals and the display screen, intensity displayed at the normal line drawing point 316 (pixels hatched in FIG. 18) corresponds to the pixel intensity data 226, intensity displayed at the pixel 501 of interest corresponds to the drawing intensity data 228 and intensity of pixel at blank portions in FIG. 18 corresponds to the current intensity data 225.
On the assumption that the pixel intensity data 226 is of an intensity of 100 and the current intensity data 225 is of an intensity of 30, the pixel ratio 7/16 obtained in FIG. 19 is used to determine the drawing intensity data 228 which is (30+(100-30)*7/16).
The above operation is repeated until interpolation of line 314 represented by the line start point X axis 221, line start point Y axis 222, line end point X axis 223 and line end point Y axis 224 ends and when the interpolation ends, the pixel intensity validator 204 delivers the draw terminate signal 234, thus terminating the drawing of the line.
However, in order to realize the line drawing by using the conventional antialiasing method, there is needed a process step of generating two lines represented by the virtual upper and lower loci 503 and 504 and deciding an area and a process step of performing calculation including division to determine a pixel ratio (7/16 shown in FIG. 19) on the basis of the area decision. In particular, these process steps are carried out through logical operation based on software and therefore depend on the throughput of the computer, making it difficult to increase the drawing speed.